Skip to content

[css-properties-values-api] Allow dashed idents in syntax strings#1137

Open
andruud wants to merge 1 commit intow3c:mainfrom
andruud:hyphen_minus
Open

[css-properties-values-api] Allow dashed idents in syntax strings#1137
andruud wants to merge 1 commit intow3c:mainfrom
andruud:hyphen_minus

Conversation

@andruud
Copy link
Copy Markdown
Member

@andruud andruud commented Jan 2, 2025

Currently, grammars like syntax:"auto | --mything" are not allowed, since we don't handle HYPHEN-MINUS during "consume a syntax component". This was likely an oversight when it was initially written.

Note: we might want to just remove the algorithms that parse syntax components from a string, and instead tokenize/parse using the new <syntax> production. If we do, that would also make dashed idents allowed unless we explicitly block it.

Currently, grammars like syntax:"auto | --mything" are not allowed,
since we don't handle HYPHEN-MINUS during "consume a syntax component".
This was likely an oversight when it was initially written.

Note: we might want to just remove the algorithms that parse
syntax components from a string, and instead tokenize/parse using
the new `<syntax>` production. If we do, that would *also* make
dashed idents allowed unless we explicitly block it.
@andruud
Copy link
Copy Markdown
Member Author

andruud commented Jan 2, 2025

cc @kizu

@yisibl
Copy link
Copy Markdown

yisibl commented Mar 16, 2026

Firefox 150 has fixed this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1939501#c8

@yisibl
Copy link
Copy Markdown

yisibl commented Mar 16, 2026

Is syntax:"--" also valid?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants